﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MediaProbe.W3Test
{
    using System.Diagnostics;
    using System.IO;
    using System.Text;
    using System.Xml;
    using System.Xml.Serialization;
    using Universe.MediaProbe;
    using Universe.MediaProbe.Utils;

    public partial class _Default : System.Web.UI.Page
    {
        protected readonly Stopwatch TotalTime = Stopwatch.StartNew();
        protected static string SampleUrl = "~/VideoSample/Vintage Columbia 1959.mp4";

        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                DataBind();
        }

        protected string BuildNativeAsHtml()
        {
            return SampleVideo.NativeReportAsHtml.Value;
        }

        protected string BuildManagedAsHtml()
        {
            return SampleVideo.ProbeReportAsHtml.Value;
        }

        protected ProbeReport Report
        {
            get { return SampleVideo.BuildProbeReport(); }
        }

        protected string GetTotalTimeAsString()
        {
            return new DateTime(0).AddMilliseconds(TotalTime.ElapsedMilliseconds).ToString("HH:mm:ss.fff");
        }



    }
}
